import { Icon } from "@/framework/tag-view";

export enum ContextMenuItemType {
  Menu,
  SubMenu,
  Custom,
  Line,
}
export interface IContextMenuItem {
  /** 菜单显示的文本 */
  text: string;
  /** 图标 */
  icon?: Icon;
  /** 菜单内容 */
  type?: ContextMenuItemType;

  /** 是否被禁用 */
  disabled?: ((item: IContextMenuItem) => boolean)|boolean;
  /** 菜单点击后处理事件 */
  onClick?: (e: MouseEvent, item: IContextMenuItem) => void;
  /** 子菜单 */
  submenus?: IContextMenuItem[];
}
